package com.choker.mall.service.impl;

import com.choker.mall.dao.UserDao;
import com.choker.mall.entity.User;
import com.choker.mall.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Lychee on 2018/2/24 10:05.
 * <p>
 * Author:Hejingzhou
 * <p>
 * Email:tcowork@163.com
 */
@Service
public class UserImpl implements UserService {

    @Resource
    private UserDao mUserDao;

    public Integer registerUser(User user) {
        return mUserDao.insertUser(user);
    }

    public Integer updateUser(User user) {
        return mUserDao.updateUser(user);
    }

    public Integer deleteUser(int id) {
        return mUserDao.deleteUser(id);
    }

    public List<User> selectAllUser() {
        return mUserDao.selectAllUser();
    }

}
